import request from '@/utils/request'

// 查询年度作物灌溉周期列表
export function listWiPeriodY(query) {
  return request({
    url: '/distribute/WiPeriodY/list',
    method: 'get',
    params: query
  })
}

// 查询年度作物灌溉周期详细
export function getWiPeriodY(cropYr,plantCd) {
  return request({
    url: '/distribute/WiPeriodY/' + cropYr +'/'+ plantCd,
    method: 'get'
  })
}

// 新增年度作物灌溉周期
export function addWiPeriodY(data) {
  return request({
    url: '/distribute/WiPeriodY',
    method: 'post',
    data: data
  })
}

// 修改年度作物灌溉周期
export function updateWiPeriodY(data) {
  return request({
    url: '/distribute/WiPeriodY',
    method: 'put',
    data: data
  })
}

// 删除年度作物灌溉周期
export function delWiPeriodY(cropYr) {
  return request({
    url: '/distribute/WiPeriodY/' + cropYr,
    method: 'delete'
  })
}
